namespace two {
    export interface IStarConfig {
        id: string,
        name: string,
        key: string,
        title: string,
        icon: number,
        x: number,
        y: number,
        z: number,
        isTouch: boolean,
        size:number
    }

    export class StarConfig {
        static getConfigById(id: string): IStarConfig {
            let cfgs = this.getAllConfigs();
            for (let i = 0; i < cfgs.length; i++) {
                if (cfgs[i].id == id) {
                    return cfgs[i];
                }
            }

            return null;
        }

        static getAllConfigs(): IStarConfig[] {
            return RES.getRes("stars_json") as IStarConfig[];
        }
    }
}